const fromBase64toFloat = function (a) {
	// 将base64转为Unicode规则编码
	let bstr = atob(a),
		n = bstr.length,
		m = 4;
	let result = [];
	for (var i = 0; i < n; i += m) {
		let u8arr = new Uint8Array(m);
		// 转换编码后才可以使用charCodeAt 找到Unicode编码
		for (let j = 0; j < m; j++) {
			u8arr[j] = bstr.charCodeAt(i + j);
		}
		let dataview = new DataView(u8arr.buffer, 0, 4); //用来读取数字
		result.push(dataview.getFloat32(0, true));
	}
	return result;
};

export { fromBase64toFloat };
